package com.sunny.shop.repository;

import com.sunny.shop.model.Collect;
import com.sunny.shop.model.Riddle;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface RiddleRepository extends JpaRepository<Riddle,Long> {

    @Query("select r from Riddle as r where r.cateId = :cateId")
    List<Riddle> selectByLimit(Long cateId, Pageable pageable);
}
